home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tas407.zip / GRAPH.DOC < prev    next >
Text File  |  1991-07-18  |  3KB  |  67 lines

  1.                         APPENDIX A
  2.  
  3. TAS GRAPH Function
  4. ---------------------
  5.  
  6. The new TAS GRAPH functions are:
  7.  
  8. OPENGRAPH(numgraphs[,start,end])
  9.  
  10.         This function prepares for "numgraph" graph windows to
  11.         be displayed. The dates displayed are from quote 'start'
  12.         to quote number 'end'. For example, to prepare to display
  13.         3 graphs of the last 50 days, you would say:
  14.                 OPENGRAPH(3,-50,0);
  15.         The 'start' and 'end' values are optional, so you don't have
  16.         to specify them. If they are not specified, the default is 
  17.         to display from the first to the last quote. 
  18.  
  19. SIZEGRAPH(s1,s2,..sN)
  20.  
  21.         where 's1'..'sN' are the number of 'shares' of the display
  22.         area each graph prepared by the OPENGRAPH function will get
  23.         when shown. For example, as above, with 3 graphs to be 
  24.         displayed, if you want the first graph to have 2 times as
  25.         much space as the second or third, you would say
  26.                 SIZEGRAPH(2,1,1);
  27.         Note that there must be as many parameters to the SIZEGRAPH
  28.         function as the number in the first parameter of the 
  29.         OPENGRAPH function ('numgraphs' above).
  30.  
  31. GRAPH(a1,l1,a2,l2...,aN,lN)
  32.         where 'a1' is the first array to be graphed, 'l1' is the 
  33.         legend (name to be displayed with) the graph of 'a1', 
  34.         'a2' is the second array and 'l2' is the second legend. 
  35.         Each of the arrays and legends specified in the GRAPH 
  36.         command are graphed in the same window, one on top of the 
  37.         other. For example, to graph +DI, -DI and ADX on the same
  38.         graph, you would say
  39.                 GRAPH(PDI(14),'+DI',MDI(14),'-DI',ADX(14),'ADX 14');
  40.         Simple as that.
  41.  
  42.         There is a special 'array' named '1' which represents the 
  43.         Price Bar Chart normally seen in charts. So, to plot the 
  44.         price bar chart, you could say
  45.                 GRAPH(1);
  46.  
  47. DRAWLINE(color,x1,y1,x2,y2,start,end)
  48.         This function will draw a line from the point (x1,y1) to
  49.         (x2,y2) starting at point 'start' and ending at point 'end'.
  50.         The 'color' parameter can be in the range from 0 (black) to
  51.         15 (white).
  52.  
  53. CLOSEGRAPH()
  54.         The CLOSEGRAPH() function waits for you to hit any key. If
  55.         you hit an ESC or CTRL-C the graphing (and the script) 
  56.         stop completely. Any other key will close the graph and 
  57.         go back to the regular TAS output display.
  58.  
  59. Here is an example of a graph that shows how to draw a price graph
  60. with Bollinger Bands around it in the first (top) graph and the
  61. MACD indicator and its trigger in the bottom graph.
  62.  
  63.         opengraph(2); 
  64.         graph(bbandt(20,2),bbandb(20,2),1);
  65.         graph(macd(),'Macd',macdtrigger(),'Trigger');
  66.         closegraph();
  67.